#!/bin/bash
PYTHON_DIR="/list_test_files"
OUTPUT_FILE="$PYTHON_DIR/__list_output.txt"
TESTCLASS=$1
TIMEOUT=$2
PYTHON_ARGS=""

# Initialization
cd $PYTHON_DIR

# Stage 1 Run:
echo "<pre>" > $OUTPUT_FILE
echo "Stage 1 / 1: running test ..." >> $OUTPUT_FILE
echo "----- Running test file Test$TESTCLASS.py<br />" >> $OUTPUT_FILE
#cp /list_shared_files/python/*.py $PYTHON_DIR/.
nice run_with_timeout $TIMEOUT /usr/bin/python3.4 $PYTHON_ARGS "Test$TESTCLASS.py" >> $OUTPUT_FILE 2>> $OUTPUT_FILE
RETURN_VALUE=$?
echo "----- Testing finished.</pre>" >> $OUTPUT_FILE
exit $RETURN_VALUE
